<?php
/**
 * 首页控制器类
 * User: mrlifang
 * Date: 17/5/4
 * Time: 下午12:49
 */

namespace Admin\Controller;
use  Admin\Model\IndexModel;
use Frame\Libs\BaseController;
final class IndexController extends BaseController
{
    /*
     * 首页显示方法
     */
    public function index(){
        $this->denyAccess();
//        //① 创建模型类对象
//        //$modelObj = new IndexModel();
//        $modelObj = IndexModel::getInstance();
//        //② 获取多行数据
//        $arrs = $modelObj->fetchAll();
//
//        //向视图赋值,并调用视图显示
//        $this->smarty->assign("arrs",$arrs);
//        $this->smarty->display("index.html");

        //调用index.html视图文件
        $this->smarty->display("Index".DS."index.html");
    }

    /*
     * 顶部视图
    */
    public function top(){
        $this->denyAccess();
        $this->smarty->display("Index".DS."top.html");
    }

    /*
     * 左侧视图
     */
    public function left(){
        $this->denyAccess();
        $this->smarty->display("Index".DS."left.html");
    }

    /*
     * 中部视图
     */

    public function center(){
        $this->denyAccess();
        $this->smarty->display("Index".DS."center.html");
    }

    /*
     * 主框架视图文件
     */
    public function main(){
        $this->denyAccess();
        $this->smarty->display("Index".DS."main.html");
    }

}